<?php
// File Security Check
if ( ! empty( $_SERVER['SCRIPT_FILENAME'] ) && basename( __FILE__ ) == basename( $_SERVER['SCRIPT_FILENAME'] ) ) :
	die ( 'You do not have sufficient permissions to access this page!' );
endif;

/*
 * Displays page sub title block
 */

global $nice_options;

if ( is_category() || is_tax() ):
 	$title = single_cat_title( '', false );
else:
	$title = get_the_title();
endif;

$nice_phone_number = $nice_options['nice_phone_number'];
$page_sub_title = get_post_meta( get_the_ID(), 'page_sub_title', true );

$main_title_class = ( $nice_phone_number == '' ) ? 'full-width-title' : '';
$main_title_class .= ( $page_sub_title == '' ) ? ' large-width-title' : '';
?>

 <hgroup class="page-head">

		<header class="main-title col-full <?php echo $main_title_class; ?>">
			<div class="left">
				<h1 class="entry-title"><?php echo $title; ?></h1>
				<?php if ( $page_sub_title != '' ) : ?>
				<span class="title-desc">
					<span class="display-table">
						<span>
							<?php echo $page_sub_title; ?>
						</span>
					</span>
				</span>
				<?php endif; ?>
			</div>
			<?php if ( $nice_phone_number != '' ) : ?>
				<div class="right">
					<span class="call-now"><?php echo $nice_options['nice_call_now_text']; ?></span>
					<span class="call-number"><?php echo $nice_options['nice_phone_number']; ?></span>
				</div>
			<?php endif; ?>
                        <div class="right breadcrumbs">
                        <?php if(function_exists('bcn_display'))
                            {
                                bcn_display();
                            }?>
                        </div>
		</header>
     
 </hgroup>